package com.shijunhao.graduation.service.business;

import com.shijunhao.graduation.domain.entity.BusinessHotInfo;
import com.shijunhao.graduation.domain.vo.PieCulVo;
import com.shijunhao.graduation.domain.vo.UserCulVo;
import com.shijunhao.graduation.service.system.BaseService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shijunhao
 * @since 2022-04-10
 */
public interface IBusinessHotInfoService extends BaseService<BusinessHotInfo> {
    /**
     * @return: java.util.List<com.shijunhao.graduation.domain.vo.GenderCulVo>
     * @author: shijunhao
     * @date: 2022/4/15 15:55
     * @description: 统计发文性别占比
     */
    List<PieCulVo> noteGenderInfo();

    /**
     * @return: java.util.List<com.shijunhao.graduation.domain.vo.PieCulVo>
     * @author: shijunhao
     * @date: 2022/4/15 17:11
     * @description: 统计发文年龄占比
     */
    List<PieCulVo> noteAgeInfo();

    /**
     * @param tableName: 表名value
     * @param nid: 文章id
     * @return: com.shijunhao.graduation.domain.entity.BusinessHotInfo
     * @author: shijunhao
     * @date: 2022/4/18 16:31
     * @description: 获取文章热度信息
     */
    BusinessHotInfo getHotInfo(String tableName,Long nid);

    /**
     * @param id: 热度id
     * @return: com.shijunhao.graduation.domain.entity.BusinessHotInfo
     * @author: shijunhao
     * @date: 2022/4/24 23:27
     * @description: 获取热度id信息
     */
    BusinessHotInfo getById(Long id);

    /**
     * @param tableName: 表名value
     * @param nid: 文章id
     * @return: boolean
     * @author: shijunhao
     * @date: 2022/4/18 16:36
     * @description: 插入默认初始热度信息
     */
    boolean insertDefaultHotInfo(String tableName,Long nid);

    /**
     * @param uid: 用户id
     * @return: com.shijunhao.graduation.domain.vo.UserCulVo
     * @author: shijunhao
     * @date: 2022/4/17 1:35
     * @description: 获取用户统计信息
     */
    UserCulVo toUserCulVo(Long uid);

    /**
     * @return: com.shijunhao.graduation.domain.vo.UserCulVo
     * @author: shijunhao
     * @date: 2022/5/30 16:45
     * @description: 管理员统计信息
     */
    UserCulVo toAdminCulVo(Long uid);
}
